<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>

<jsp:include   page="common/header.jsp" flush="true">
    <jsp:param name="title" value="系统字典管理" /> 
</jsp:include>
<jsp:include   page="common/left.jsp" flush="true"/> 

	<!-- 右侧 -->
	<div class="record-page">
		<div class="container-fluid">
			<div class="row">
				<div class="col-lg-12">
					<div class="panel">
						<div class="panel-heading">
							<div class="row">
								<span class="record-heading-icon"></span> <span class="text">系统字典管理</span>
							</div>
						</div>
						<div class="panel-body">
							<div class="panel-body-title clearfix">
								<div class="left fl">
										<div class="check-wrapper">
											<div class="record-check-name">
												<input type="radio" name="check-answer" /><span>请选择字典表</span>
												<select name="" id="dictLists">
													<c:forEach items="${wxDictList }" var="dict" varStatus="status">
															<option value="${dict.id}" 
														<c:if test="${dict.id == wxDict.id }">selected="selected"</c:if>>${dict.dictnameStr }</option>
													</c:forEach>
												</select>
												<!-- 添加字典 begin -->
												<button id="button-bound" type="button" class="btn btn-primary dropdown-toggle">
                                 			       <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>添加字典内容
                                			    </button>
												<!-- 添加字典 end -->
											</div>
										</div>
								</div>
							</div>
							<div class="row">
								<div class="col-lg-6">
									<div class="table-responsive">
										<form action="">
											<table class="table table-bordered table-hover">
												<thead>
													<tr>
														<th>序号</th>
														<th>字典内容</th>
														<th>字典字段名称</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody class="news">
													<c:forEach items="${infoList }" var="info" varStatus="status">
														<tr>
															<td>${status.index+1}</td>
															<td>${info }</td>
															<td>${wxDict.dictnameStr }</td>
<!-- 															编辑按钮 -->
															<td>	
															<shiro:hasPermission name="wxDict-edit">
															 <a href="javascript:void(0)" id="crime-delete" onclick="delUsertail('${wxDict.id}','${status.index }')">	
																<span class="glyphicon glyphicon-edit"
																	aria-hidden="true" id="crime-edit"></span>
															</a>
															</shiro:hasPermission>	
															<!-- 删除按钮 -->
															<shiro:hasPermission name="wxDict-delete">
																 <a href="javascript:void(0)" id="crime-delete" onclick="delUsertail('${wxDict.id}','${status.index }')">
																 	<span
																	class="glyphicon glyphicon-remove-circle"
																	aria-hidden="true"></span></a>
															</shiro:hasPermission>		
															</td>
														</tr>
													</c:forEach>
												</tbody>
											</table>
										</form>
										
										<!-- 前端分页插件begin -->
										<div class="page">
										<div class="left fl">
										    <input id="start_page" value="0" type="hidden">
										    <input id="current_page" value="0" type="hidden">
										    <input id="show_per_page" value="10" type="hidden">
										    <input id="end_page" value="10" type="hidden">
										    <div id="pageGro" class="cb">
										        <a href="javascript:;" class="pagestart">首页</a>
<!-- 										        <a href="javascript:;" class="pageUp">上一页</a> -->
										        <div class="pageList">
										            <ul>
										           <li class="on">1</li>
										         <li>2</li>
										         <li>3</li>
										         <li>4</li>
										         <li>5</li>
										            </ul>
										        </div>
										        <a href="javascript:;" class="pageDown">下一页</a>
										        <a href="javascript:;" class="pageend">尾页</a>
										        <div class="link-page">
										            <span>跳至</span>
										            <input type="text">
										            <a href="javascript:;" class="pageHerf">Go</a>
										        </div>
										        <div class="page-total-info">
										       		 </div>
										       	  </div>
										        </div>
										        <div class="right fr">
											            <span class="now-num">当前第<b>1</b>页</span>
											            <span class="toggle-num">共<b>10</b>页</span>
										        </div>
										   
										    </div>
										<!-- 前端分页插件end -->
									</div>
								</div>
								       <!-- 浮层 -->
						        <div class="allot-bound-msk none">
						            <div class="allot-bound-dialog">
						                <div class="title">
						                    <div class="left fl">
						                        <span>添加字典</span>
						                    </div>
						                    <div class="right fr">
						                        <a href="javascript:;" class="bound-msk-close"></a>
						                    </div>
						                </div>
						                <div class="content">
						                    <form action="">
						                        <div class="bound-check-role">
						                            <span>字典内容：</span>
						                            <input id="addDicStr"  value="" >
						                        </div>
						                        <a id="bound-info-save" href="javascript:;" class="bound-info-save" onclick="addDic(${wxDict.id })">提交</a>
						                    </form>
						                </div>
						       	     </div>
									</div>
							<!-- 浮沉  end -->
						</div>
						
					</div>
				</div>
			</div>
		</div>

    </div>
<link rel="stylesheet" type="text/css" href="${basePath }/page/js/page/pageGroup.css" />
<script type="text/javascript" src="${basePath }/page/js/page/pageGroup.js"></script>
<script type="text/javascript" src="${basePath }/page/js/dic/dic.js"></script>
<script type="text/javascript">
//select
$("#dictLists").change(function(){
	var vo = $("#dictLists").val();
	return location="${basePath }/wxDictAction_findAll?currentDicId="+vo;		
});

</script>
<jsp:include   page="common/bottom.jsp" flush="true"/> 